package com.example.hello1;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class show_fetch_rate extends AppCompatActivity implements View.OnClickListener {
    TextView countryname,rate;
    EditText editText;
    String value;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fetch_rate_calculate);
        Intent intent=getIntent();
        String name=intent.getStringExtra("ItemTitle");
        value=intent.getStringExtra("ItemDetail");
        countryname=findViewById(R.id.country);
        editText=findViewById(R.id.input_rate);
        rate=findViewById(R.id.show_rate);
        countryname.setText(name);
    }

    @Override
    public void onClick(View v) {
        float rate1= Float.valueOf(value);
        String input=editText.getText().toString();
        rate.setText(""+Float.valueOf(input)*100/rate1);

    }
}



